package com.yami.shop.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yami.shop.bean.model.TakeStockProd;
import com.yami.shop.bean.vo.TakeStockProdVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 盘点商品列表
 *
 * @author Citrus
 * @date 2021-09-15 11:18:33
 */
public interface TakeStockProdMapper extends BaseMapper<TakeStockProd> {
    /**
     * 查找商品列表
     * @param takeStockId
     * @return
     */
    List<TakeStockProdVO> listShopProd(@Param("takeStockId") Long takeStockId);

    /**
     * 根据商品id删除盘点商品
     * @param prodId
     */
    void deleteByProdId(@Param("prodId")Long prodId);

    /**
     * 根据商品id查找盘点列表
     * @param prodId
     * @return
     */
    List<Long> listInventoryByProdId(@Param("prodId") Long prodId);

    /**
     * 根据skuIds查找盘点id
     * @param skuIds
     * @return
     */
    List<Long> listTakeStockIdBySkuIds(@Param("skuIds") List<Long> skuIds);

    /**
     * 根据skuId删除商品
     * @param prodId
     * @param skuIds
     */
    void deleteBySkuIds(@Param("prodId") Long prodId,@Param("skuIds") List<Long> skuIds);
}
